/*Ejercicio 2.19
  ejer2_19.c*/
#include <stdio.h>
#include <stdlib.h>

/* funcion main, aca inicia el programa*/
int main()
{
    int n1, n2, n3;
    int sum, average, product, smallest, largest;

    printf( "Input three different integers: " );
    scanf( "%d%d%d", &n1, &n2, &n3 );

    sum = n1 + n2 + n3;
    average = sum / 3;
    product = n1 * n2 * n3;
    smallest = n1;
    largest = n1;

    if ( n2 > largest ) {
        largest = n2;
    }

    if ( n3 > largest ) {
        largest = n3;
    }

    if ( n2 < smallest ) {
        smallest = n2;
    }

    if ( n3 < smallest ) {
        smallest = n3;
    }

    printf( "Sum is %d\n", sum );
    printf( "Average is %d\n", average );
    printf( "Product is %d\n", product );
    printf( "Smallest is %d\n", smallest );
    printf( "Largest is %d\n", largest );

    return 0;
} /* fin de la funcion main*/
